package cn.wolfcode.wolf2w.controller;

import cn.wolfcode.wolf2w.domain.HotDest;
import cn.wolfcode.wolf2w.service.IHotDestService;
import cn.wolfcode.wolf2w.service.IStrategyCatalogService;
import cn.wolfcode.wolf2w.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("hostdest")
public class HotDestController {
    @Autowired
    private IHotDestService hotDestService;

    @GetMapping("list")
    public Object list(){
        List<HotDest> list = hotDestService.list();
        return JsonResult.success(list);
    }

    @GetMapping("get")
    public Object get(String id){
        HotDest hotDest = hotDestService.get(id);
        return JsonResult.success(hotDest);
    }
}
